package com.extr.persistence;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.extr.domain.exam.HomeWorkHistory;
import com.extr.util.Page;

public interface HomeWorkingMapper {

	HomeWorkHistory getUserHomeWorkHistoryByUserIdAndHomeWorkId(@Param("userId") int userId,@Param("homeWorkId") int homeWorkId);

	void addUserHomeWorkHistory(HomeWorkHistory homeWorkHistory);

	HomeWorkHistory getUserHomeWorkHistoryByHistId(@Param("homework_history_id") int homework_history_id);

	void updateHomeWorkHistory(HomeWorkHistory homeWorkHistory);

	List<HomeWorkHistory> getHomeWorkHistByHomeWorkId(@Param("homeWorkId") int homeWorkId,
			@Param("page") Page<HomeWorkHistory> page);

	void updateHomeWorkHistoryOfTeacher(HomeWorkHistory homeWorkHistory);

	List<HomeWorkHistory> getHomeWorkHistByUserId(@Param("userId") int userId,
			@Param("page") Page<HomeWorkHistory> pageModel);
	
}
